+Thu Nov 1 19:11:35 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtkrbtree.c (gtk_rbtree_reorder_fixup): Fix reorder_fixup,
+ #59583
+
+ * gtk/gtktreeselection.c (gtk_tree_selection_set_mode): fix
+ warning.
+
Thu Nov 1 16:54:00 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtktypeutils.h: Make GtkFunction return boolean, not gint.
+Thu Nov 1 19:11:35 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtkrbtree.c (gtk_rbtree_reorder_fixup): Fix reorder_fixup,
+ #59583
+
+ * gtk/gtktreeselection.c (gtk_tree_selection_set_mode): fix
+ warning.
+
Thu Nov 1 16:54:00 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtktypeutils.h: Make GtkFunction return boolean, not gint.
+Thu Nov 1 19:11:35 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtkrbtree.c (gtk_rbtree_reorder_fixup): Fix reorder_fixup,
+ #59583
+
+ * gtk/gtktreeselection.c (gtk_tree_selection_set_mode): fix
+ warning.
+
Thu Nov 1 16:54:00 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtktypeutils.h: Make GtkFunction return boolean, not gint.
+Thu Nov 1 19:11:35 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtkrbtree.c (gtk_rbtree_reorder_fixup): Fix reorder_fixup,
+ #59583
+
+ * gtk/gtktreeselection.c (gtk_tree_selection_set_mode): fix
+ warning.
+
Thu Nov 1 16:54:00 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtktypeutils.h: Make GtkFunction return boolean, not gint.
+Thu Nov 1 19:11:35 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtkrbtree.c (gtk_rbtree_reorder_fixup): Fix reorder_fixup,
+ #59583
+
+ * gtk/gtktreeselection.c (gtk_tree_selection_set_mode): fix
+ warning.
+
Thu Nov 1 16:54:00 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtktypeutils.h: Make GtkFunction return boolean, not gint.
+Thu Nov 1 19:11:35 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtkrbtree.c (gtk_rbtree_reorder_fixup): Fix reorder_fixup,
+ #59583
+
+ * gtk/gtktreeselection.c (gtk_tree_selection_set_mode): fix
+ warning.
+
Thu Nov 1 16:54:00 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtktypeutils.h: Make GtkFunction return boolean, not gint.
+Thu Nov 1 19:11:35 2001 Jonathan Blandford <jrb@redhat.com>
+
+ * gtk/gtkrbtree.c (gtk_rbtree_reorder_fixup): Fix reorder_fixup,
+ #59583
+
+ * gtk/gtktreeselection.c (gtk_tree_selection_set_mode): fix
+ warning.
+
Thu Nov 1 16:54:00 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtktypeutils.h: Make GtkFunction return boolean, not gint.
gint flags;
gint order;
gint invert_order;
+ gint parity;
} GtkRBReorder;
static int
if (node == tree->nil)
return;
+ node->parity = 1;
+
if (node->left != tree->nil)
{
gtk_rbtree_reorder_fixup (tree, node->left);
node->offset += node->left->offset;
+ node->parity += node->left->parity;
}
if (node->right != tree->nil)
{
gtk_rbtree_reorder_fixup (tree, node->right);
node->offset += node->right->offset;
+ node->parity += node->right->parity;
}
if (node->children)
- node->offset += node->children->root->offset;
+ {
+ node->offset += node->children->root->offset;
+ node->parity += node->children->root->parity;
+ }
}
/* It basically pulls everything out of the tree, rearranges it, and puts it
* heights. There is probably a more elegant way to write this function. If
* anyone wants to spend the time writing it, patches will be accepted.
*/
-
void
_gtk_rbtree_reorder (GtkRBTree *tree,
gint *new_order,
tree,
anchor_path,
0);
- gtk_tree_path_free (anchor_path);
+ if (anchor_path)
+ gtk_tree_path_free (anchor_path);
}
selection->type = type;
{
g_return_if_fail (GTK_IS_TREE_VIEW (tree_view));
- if (tree_view->priv->reorderable == (reorderable?TRUE:FALSE))
+ reorderable = reorderable != FALSE;
+
+ if (tree_view->priv->reorderable == reorderable)
return;
- gtk_tree_view_set_rows_drag_source (tree_view,
- GDK_BUTTON1_MASK,
- row_targets,
- G_N_ELEMENTS (row_targets),
- GDK_ACTION_MOVE,
- NULL, NULL);
- gtk_tree_view_set_rows_drag_dest (tree_view,
- row_targets,
- G_N_ELEMENTS (row_targets),
- GDK_ACTION_MOVE,
- NULL, NULL);
+ tree_view->priv->reorderable = reorderable;
+
+ if (reorderable)
+ {
+ gtk_tree_view_set_rows_drag_source (tree_view,
+ GDK_BUTTON1_MASK,
+ row_targets,
+ G_N_ELEMENTS (row_targets),
+ GDK_ACTION_MOVE,
+ NULL, NULL);
+ gtk_tree_view_set_rows_drag_dest (tree_view,
+ row_targets,
+ G_N_ELEMENTS (row_targets),
+ GDK_ACTION_MOVE,
+ NULL, NULL);
+ }
+ else
+ {
+ gtk_tree_view_unset_rows_drag_source (tree_view);
+ gtk_tree_view_unset_rows_drag_dest (tree_view);
+ }
g_object_notify (G_OBJECT (tree_view), "reorderable");
}